/**
 * Implement this interface to be able to receive notifications of user
 * interacton from the ChatGUI.
 */
public interface ChatInterface {
    /**
     * Called by the GUI when it is constructed.
     */
    public void setGUI(ChatGUI gui);

    /**
     * Connect to a chat server. Both host and port may be invalid.
     * 
     * @param host
     *            - the host name the user inputs
     * @param port
     *            - the port the user inputs
     * @param nickname
     *            - the name to use when connecting to the server
     */
    public void connectChatServer(String host, String port, String nickname);

    /**
     * Disconenct from the current chat server. If this method is called without
     * being connected to any chat server nothing happens.
     */
    public void disconnectChatServer();

    /**
     * Send a text message to the chat server
     */
    public void send(String text);

    /**
     * Get the client object that implements this interface.
     */
    public ChatClient getClient();

}